A storage system typically comprises one or more storage devices into which information may be entered, and from which information may be obtained, as desired. The storage system includes a storage operating system that functionally organizes the system by, inter alia, invoking storage operations in support of a storage service implemented by the system. The storage system may be implemented in accordance with a variety of storage architectures including, but not limited to, a network-attached storage environment, a storage area network and a disk assembly directly attached to a client or host computer. The storage devices are typically disk drives organized as a disk array, managed according to a storage protocol, wherein the term “disk” commonly describes a self-contained rotating magnetic media storage device. The term disk in this context is synonymous with hard disk drive (HDD) or direct access storage device (DASD).
Storage of information on the disk array is preferably implemented as one or more storage “volumes” of physical disks, defining an overall logical arrangement of disk space. The disks within a volume are typically organized as one or more groups, wherein each group may be operated as a Redundant Array of Independent (or Inexpensive) Disks (RAID). Most RAID implementations enhance the reliability/integrity of data storage through the redundant writing of data “stripes” across a given number of physical disks in the RAID group, and the appropriate storing of redundant information (parity) with respect to the striped data. The physical disks of each RAID group may include disks configured to store striped data (i.e., data disks) and disks configured to store parity for the data (i.e., parity disks). The parity may thereafter be retrieved to enable recovery of data lost when a disk fails. The term “RAID” and its various implementations are well-known and disclosed in A Case for Redundant Arrays of Inexpensive Disks (RAID), by D. A. Patterson, G. A. Gibson and R. H. Katz, Proceedings of the International Conference on Management of Data (SIGMOD), June 1988.
The storage operating system of the storage system may implement a high-level module, such as a file system, to logically organize data containers for the information. For example, the information may be stored on the disks as a hierarchical structure of directories, files, and blocks. Each “on-disk” file may be implemented as set of data structures, i.e., disk blocks, configured to store information, such as the actual data for the file. These data blocks are organized within a volume block number (vbn) space that is maintained by the file system. The file system may also assign each data block in the file a corresponding “file offset” or file block number (fbn). The file system typically assigns sequences of fbns on a per-file basis, whereas vbns are assigned over a larger volume address space. The file system organizes the data blocks within the vbn space as a “logical volume”; each logical volume may be, although is not necessarily, associated with its own file system. The file system typically consists of a contiguous range of vbns from zero to n, for a file system of size n+1 blocks.
A known type of file system is a write-anywhere file system that does not overwrite data on disks. If a data block is retrieved (read) from disk into a memory of the storage system and “dirtied” (i.e., updated or modified) with new data, the data block is thereafter stored (written) to a new location on disk to optimize write performance. A write-anywhere file system may initially assume an optimal layout such that the data is substantially contiguously arranged on disks. The optimal disk layout results in efficient access operations, particularly for sequential read operations, directed to the disks. An example of a write-anywhere file system that is configured to operate on a storage system is the Write Anywhere File Layout (WAFL®) file system available from Network Appliance, Inc., Sunnyvale, Calif.
In a large file system, it is common to find duplicate occurrences of individual blocks of data. Duplication of data blocks may occur when, for example, two or more files or other data containers share common data or where a given set of data occurs at multiple places within a given file. Duplication of data blocks results in inefficient use of storage space by storing the identical data in a plurality of differing locations served by a storage system.
One technique that has been used to address this problem is referred to as “file folding”. The basic principle of file folding is to allow new data of a file in the active file system to share a disk block with old data of the file in a persistent image if the new data are identical to the old data. This technique has been implemented in storage systems available from Network Appliance, Inc., of Sunnyvale, Calif. Specifically, these storage systems are capable of generating a persistent consistency point image (PCPI) of a specified set of data. A PCPI is a space conservative, point-in-time read-only image of data (such as a storage system) accessible by name that provides a consistent image of that data at some previous time. More particularly, a PCPI is a point-in-time representation of a storage element, such as an active file system, file or database, stored on a storage device (e.g., a disk) or other persistent memory and having a name or other identifier that distinguishes it from other PCPIs taken at other points in time. One example of a PCPI is a Snapshot™, as implemented in storage systems available from Network Appliance, Inc. The terms “PCPI” and “snapshot” may be used interchangeably throughout this patent without derogation of Network Appliance's trademark rights.
A technique for generating PCPIs is described in greater detail in commonly assigned U.S. Pat. No. 5,819,292, entitled METHOD FOR MAINTAINING CONSISTENT STATES OF A FILE SYSTEM AND FOR CREATING USER-ACCESSIBLE READ-ONLY COPIES OF A FILE SYSTEM, issued on Oct. 6, 1998, by David Hitz, et al. Illustratively, if a block within a data container that has been “Snapshotted” is modified, the storage system only creates the modified block for that data container in an active file system, rather than creating another complete (modified) copy of the data container. For each unmodified block, the storage system simply gives the data container a pointer to the corresponding block in the PCPI. In this way, the unmodified blocks in the PCPI become shared between the PCPI and the active file system. This technique is described in greater detail in commonly assigned U.S. Pat. No. 7,072,910, entitled FILE FOLDING TECHNIQUE, issued on Jul. 4, 2006, by Andy Kahn, et al.
File folding does help to more efficiently use storage space. However, it is desirable to reduce data duplication in an active file system without having to rely on a PCPI, such as a Snapshot. Furthermore, it is desirable to identify and eliminate duplicate data blocks which may occur in the active file system due to duplicate files or duplicate data within a single file. More generally, it is desirable to reduce data duplication regardless of the location of the data in the storage system.
Another technique for achieving a reduction in data duplication (deduplication) is described in U.S. Pat. No. 5,990,810, entitled METHOD FOR PARTITIONING A BLOCK OF DATA INTO BLOCKS AND FOR STORING AND COMMUNICATING SUCH SUBBLOCKS, by Ross Williams, issued Nov. 23, 1999 (hereafter “the '810 patent”). The method described in the '810 patent first utilizes a rolling hash function to generate a plurality of sub-blocks of data. The rolling hash utilizes a fixed size window of data that results in a boundary being placed between two sub-blocks. Once a block of data has been partitioned into sub-blocks, the hash value of each sub-block is calculated to form a table of hash values. The hash table is then used to determine if a new sub-block is identical to any sub-block whose hash value has previously been stored in the hash table. To perform this determination, the new sub-block's hash value is calculated and compared with the values contained in the hash table. If the new sub-block's hash value has been previously stored within the hash table, then the sub-block identified with the stored hash value is considered as identical with the new sub-block. In such a case, the new sub-block is replaced with a pointer to the previously stored sub-block, thereby reducing the amount of storage space required for the sub-block. A noted disadvantage of the technique described in the '810 patent is that it requires performance of an extensive number of computationally intensive hashing calculations, which may affect the overall performance of a storage system implementing such a method. Another noted disadvantage is that the hash table will become larger as the size of the data set increases and may not scale to large data sets such as terabytes or petabytes of data.
Another technique for eliminating duplicate data is described in commonly assigned U.S. patent application Ser. No. 11/105,895, filed on Apr. 13, 2005, entitled METHOD AND APPARATUS FOR IDENTIFYING AND ELIMINATING DUPLICATE DATA BLOCKS AND SHARING DATA BLOCKS IN A STORAGE SYSTEM, by Ling Zheng, et al, the contents of which are hereby incorporated by reference. In the system described in this patent application, all data deduplication operations are performed on fixed size blocks that are illustratively 4 kilobytes (KB) in size. When a new block is to be stored, a hash value is computed as a fingerprint of the 4 KB block. The fingerprint is then compared with a hash table containing fingerprints of previously stored blocks. Should the new block's fingerprint be identical to that of a previously stored block, there is a high degree of probability that the new block is identical to the previously stored block. In such a case, the new block is replaced with a pointer to the previously stored block, thereby reducing storage resource consumption.
However, a disadvantage of this system is that it requires a hash computation when a new 4 KB block is stored. Such a computation may utilize additional processing resources, depending on the size of the fingerprint and the data block, which, in turn, may depend on the size of the storage system. Moreover, there is a slight probability that identical fingerprints will not indicate duplicate data. Illustratively, during the deduplication process, data blocks with identical fingerprints are still compared to verify that they are, in fact, identical. Therefore it is desirable to use fewer processing resources when generating the fingerprint, while preserving a reasonable degree of probability that identical fingerprints will indicate duplicate data, in order to facilitate data block comparison during a subsequent deduplication process. Additionally, modem storage systems, such as the NetApp® Data ONTAP® operating system, may already implement a checksum operation to ensure the integrity of the data blocks stored on the systems. It is desirable to have the deduplication process leverage the existing storage functionalities to conserve processing resources.